#include <stdio.h>
#include <assert.h>

int odd_ones(int x){
    x ^= x >> 16;
    x ^= x >> 8;
    x ^= x >> 4;
    x ^= x >> 2;
    x ^= x >> 1;

    x &= 0x1;
    return x;
}


int main(){
    assert(odd_ones(0x01100001) == 1);
    assert(!odd_ones(0x01110001));

    return 0;
}
